Fix(quadlet): Ensure .app application file is removed by quadlet rm --all (#27647)#27694
Fix(quadlet): Ensure .app application file is removed by quadlet rm --all (#27647)#27694kavishgr wants to merge 2 commits into
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: kavishgr The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Honny1
left a comment
There was a problem hiding this comment.
I did a quick check of the CI failure. I also fixed the release note format in the PR description.
…ntainer-tools#27653) Fix: removed return statement, which was originally added for logging. Logrus handles the logging(in its related PR podman-container-tools#27694). Signed-off-by: Kavish Gour <kavishgr@protonmail.com>
c299e69 to
40f3bff
Compare
|
This PR now includes all necessary changes. We should abandon PR #27693 and only merge this current one. |
Honny1
left a comment
There was a problem hiding this comment.
The code LGTM. However, I have a question about the tests: is there a specific reason they weren't implemented in quadlet_test.go?
On a closed PR regarding quadlets, a collaborator suggested that all quadlet tests should go into |
| # | ||
| # Install quadlets(.container, .network, .volume) | ||
|
|
||
| quadlet_name=quadlet-rm-test-$(cat /proc/sys/kernel/random/uuid) |
There was a problem hiding this comment.
Use safename (defined in helpers.bash)
There was a problem hiding this comment.
Sorry, my bad, I though this was a bats test. I'm not sure this one has the safename
There was a problem hiding this comment.
No worries. I've updated the test name to quadlet-remove-all-test to keep it consistent.
Yes, please write a simple test in Ginkgo. |
7583fd1 to
bc3a8f0
Compare
|
[NON-BLOCKING] Packit jobs failed. @containers/packit-build please check. Everyone else, feel free to ignore. |
2 similar comments
|
[NON-BLOCKING] Packit jobs failed. @containers/packit-build please check. Everyone else, feel free to ignore. |
|
[NON-BLOCKING] Packit jobs failed. @containers/packit-build please check. Everyone else, feel free to ignore. |
bc3a8f0 to
01fb0bc
Compare
01fb0bc to
55c16c1
Compare
Honny1
left a comment
There was a problem hiding this comment.
LGTM, please rebase on main.
55c16c1 to
06ccfe0
Compare
Done. Rebased on latest main. |
|
|
||
| installSession := podmanTest.Podman([]string{"quadlet", "install", tmpDir}) | ||
| installSession.WaitWithDefaultTimeout() | ||
| Expect(installSession).Should(Exit(0)) |
There was a problem hiding this comment.
This still fails on F43. I am not sure where the problem could be.
[FAIL] quadlet system generator Running quadlet force remove all [It] Should remove all quadlets at once
[+0894s] /var/tmp/go/src/github.com/containers/podman/test/e2e/quadlet_test.go:1360
There was a problem hiding this comment.
I ran the tests and they passed on my end. Here is the output:
❯ sudo ginkgo -v -focus "Running quadlet force remove all" test/e2e
Running Suite: Libpod Suite - /home/kavish/podman/test/e2e
==========================================================
Random Seed: 1766421735
Will run 1 of 2443 specs
------------------------------
[SynchronizedBeforeSuite]
/home/kavish/podman/test/e2e/common_test.go:169
[image already cached: /var/tmp/quay.io-libpod-cirros-latest.tar]
[image already cached: /var/tmp/quay.io-libpod-volume-plugin-test-img-20220623.tar]
[image already cached: /var/tmp/quay.io-libpod-alpine-latest.tar]
[image already cached: /var/tmp/quay.io-libpod-busybox-latest.tar]
[image already cached: /var/tmp/quay.io-libpod-systemd-image-20240124.tar]
[image already cached: /var/tmp/quay.io-lsm5-alpine_nginx-aarch64-latest.tar]
[image already cached: /var/tmp/quay.io-libpod-redis-alpine.tar]
[image already cached: /var/tmp/quay.io-libpod-registry-2.8.2.tar]
[image already cached: /var/tmp/quay.io-libpod-k8s-pause-3.5.tar]
[image already cached: /var/tmp/quay.io-libpod-testimage-20241011.tar]
[image already cached: /var/tmp/quay.io-libpod-alpine_healthcheck-latest.tar]
[image already cached: /var/tmp/quay.io-libpod-systemd-image-20240124.tar]
Restoring quay.io/libpod/alpine:latest...
Running: /home/kavish/podman/bin/podman --root /tmp/podman-e2e-554133839/imagecachedir --runroot /tmp/podman-e2e-554133839/image-init/runroot --runtime crun --conmon /usr/bin/conmon --network-config-dir /etc/containers/networks --network-backend netavark --cgroup-manager systemd --tmpdir /tmp/podman-e2e-554133839/image-init --events-backend none --storage-driver overlay load -q -i /var/tmp/quay.io-libpod-alpine-latest.tar
Loaded image: quay.io/libpod/alpine:latest
Restoring quay.io/libpod/busybox:latest...
Running: /home/kavish/podman/bin/podman --root /tmp/podman-e2e-554133839/imagecachedir --runroot /tmp/podman-e2e-554133839/image-init/runroot --runtime crun --conmon /usr/bin/conmon --network-config-dir /etc/containers/networks --network-backend netavark --cgroup-manager systemd --tmpdir /tmp/podman-e2e-554133839/image-init --events-backend none --storage-driver overlay load -q -i /var/tmp/quay.io-libpod-busybox-latest.tar
Loaded image: quay.io/libpod/busybox:latest
Restoring quay.io/libpod/systemd-image:20240124...
Running: /home/kavish/podman/bin/podman --root /tmp/podman-e2e-554133839/imagecachedir --runroot /tmp/podman-e2e-554133839/image-init/runroot --runtime crun --conmon /usr/bin/conmon --network-config-dir /etc/containers/networks --network-backend netavark --cgroup-manager systemd --tmpdir /tmp/podman-e2e-554133839/image-init --events-backend none --storage-driver overlay load -q -i /var/tmp/quay.io-libpod-systemd-image-20240124.tar
Loaded image: quay.io/libpod/systemd-image:20240124
Restoring quay.io/lsm5/alpine_nginx-aarch64:latest...
Running: /home/kavish/podman/bin/podman --root /tmp/podman-e2e-554133839/imagecachedir --runroot /tmp/podman-e2e-554133839/image-init/runroot --runtime crun --conmon /usr/bin/conmon --network-config-dir /etc/containers/networks --network-backend netavark --cgroup-manager systemd --tmpdir /tmp/podman-e2e-554133839/image-init --events-backend none --storage-driver overlay load -q -i /var/tmp/quay.io-lsm5-alpine_nginx-aarch64-latest.tar
Loaded image: quay.io/lsm5/alpine_nginx-aarch64:latest
Restoring quay.io/libpod/redis:alpine...
Running: /home/kavish/podman/bin/podman --root /tmp/podman-e2e-554133839/imagecachedir --runroot /tmp/podman-e2e-554133839/image-init/runroot --runtime crun --conmon /usr/bin/conmon --network-config-dir /etc/containers/networks --network-backend netavark --cgroup-manager systemd --tmpdir /tmp/podman-e2e-554133839/image-init --events-backend none --storage-driver overlay load -q -i /var/tmp/quay.io-libpod-redis-alpine.tar
Loaded image: quay.io/libpod/redis:alpine
Restoring quay.io/libpod/registry:2.8.2...
Running: /home/kavish/podman/bin/podman --root /tmp/podman-e2e-554133839/imagecachedir --runroot /tmp/podman-e2e-554133839/image-init/runroot --runtime crun --conmon /usr/bin/conmon --network-config-dir /etc/containers/networks --network-backend netavark --cgroup-manager systemd --tmpdir /tmp/podman-e2e-554133839/image-init --events-backend none --storage-driver overlay load -q -i /var/tmp/quay.io-libpod-registry-2.8.2.tar
Loaded image: quay.io/libpod/registry:2.8.2
Restoring quay.io/libpod/k8s-pause:3.5...
Running: /home/kavish/podman/bin/podman --root /tmp/podman-e2e-554133839/imagecachedir --runroot /tmp/podman-e2e-554133839/image-init/runroot --runtime crun --conmon /usr/bin/conmon --network-config-dir /etc/containers/networks --network-backend netavark --cgroup-manager systemd --tmpdir /tmp/podman-e2e-554133839/image-init --events-backend none --storage-driver overlay load -q -i /var/tmp/quay.io-libpod-k8s-pause-3.5.tar
Loaded image: quay.io/libpod/k8s-pause:3.5
Restoring quay.io/libpod/testimage:20241011...
Running: /home/kavish/podman/bin/podman --root /tmp/podman-e2e-554133839/imagecachedir --runroot /tmp/podman-e2e-554133839/image-init/runroot --runtime crun --conmon /usr/bin/conmon --network-config-dir /etc/containers/networks --network-backend netavark --cgroup-manager systemd --tmpdir /tmp/podman-e2e-554133839/image-init --events-backend none --storage-driver overlay load -q -i /var/tmp/quay.io-libpod-testimage-20241011.tar
Loaded image: quay.io/libpod/testimage:20241011
Restoring quay.io/libpod/alpine_healthcheck:latest...
Running: /home/kavish/podman/bin/podman --root /tmp/podman-e2e-554133839/imagecachedir --runroot /tmp/podman-e2e-554133839/image-init/runroot --runtime crun --conmon /usr/bin/conmon --network-config-dir /etc/containers/networks --network-backend netavark --cgroup-manager systemd --tmpdir /tmp/podman-e2e-554133839/image-init --events-backend none --storage-driver overlay load -q -i /var/tmp/quay.io-libpod-alpine_healthcheck-latest.tar
Loaded image: quay.io/libpod/alpine_healthcheck:latest
Restoring quay.io/libpod/systemd-image:20240124...
Running: /home/kavish/podman/bin/podman --root /tmp/podman-e2e-554133839/imagecachedir --runroot /tmp/podman-e2e-554133839/image-init/runroot --runtime crun --conmon /usr/bin/conmon --network-config-dir /etc/containers/networks --network-backend netavark --cgroup-manager systemd --tmpdir /tmp/podman-e2e-554133839/image-init --events-backend none --storage-driver overlay load -q -i /var/tmp/quay.io-libpod-systemd-image-20240124.tar
Loaded image: quay.io/libpod/systemd-image:20240124
-----------------------------
[SynchronizedBeforeSuite] PASSED [3.831 seconds]
------------------------------
SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS
------------------------------
quadlet system generator Running quadlet force remove all Should remove all quadlets at once
/home/kavish/podman/test/e2e/quadlet_test.go:1339
Running: /home/kavish/podman/bin/podman --storage-opt overlay.imagestore=/tmp/podman-e2e-554133839/imagecachedir --root /tmp/podman-e2e-554133839/subtest-3789943928/p/root --runroot /tmp/podman-e2e-554133839/subtest-3789943928/p/runroot --runtime crun --conmon /usr/bin/conmon --network-config-dir /etc/containers/networks --network-backend netavark --cgroup-manager systemd --tmpdir /tmp/podman-e2e-554133839/subtest-3789943928/p --events-backend file --storage-driver overlay quadlet install /tmp/podman-e2e-554133839/subtest-3789943928/p/quadlet-remove-all-test-1766421735
/etc/containers/systemd/quadlet-remove-all-test-1766421735.volume
/etc/containers/systemd/quadlet-remove-all-test-1766421735.container
/etc/containers/systemd/quadlet-remove-all-test-1766421735.network
Running: /home/kavish/podman/bin/podman --storage-opt overlay.imagestore=/tmp/podman-e2e-554133839/imagecachedir --root /tmp/podman-e2e-554133839/subtest-3789943928/p/root --runroot /tmp/podman-e2e-554133839/subtest-3789943928/p/runroot --runtime crun --conmon /usr/bin/conmon --network-config-dir /etc/containers/networks --network-backend netavark --cgroup-manager systemd --tmpdir /tmp/podman-e2e-554133839/subtest-3789943928/p --events-backend file --storage-driver overlay quadlet list --format json
[
{
"Name": "quadlet-remove-all-test-1766421735.container",
"UnitName": "quadlet-remove-all-test-1766421735.service",
"Path": "/etc/containers/systemd/quadlet-remove-all-test-1766421735.container",
"Status": "inactive/dead",
"App": ".quadlet-remove-all-test-1766421735.app"
},
{
"Name": "quadlet-remove-all-test-1766421735.network",
"UnitName": "quadlet-remove-all-test-1766421735-network.service",
"Path": "/etc/containers/systemd/quadlet-remove-all-test-1766421735.network",
"Status": "inactive/dead",
"App": ".quadlet-remove-all-test-1766421735.app"
},
{
"Name": "quadlet-remove-all-test-1766421735.volume",
"UnitName": "quadlet-remove-all-test-1766421735-volume.service",
"Path": "/etc/containers/systemd/quadlet-remove-all-test-1766421735.volume",
"Status": "inactive/dead",
"App": ".quadlet-remove-all-test-1766421735.app"
}
]
Running: /home/kavish/podman/bin/podman --storage-opt overlay.imagestore=/tmp/podman-e2e-554133839/imagecachedir --root /tmp/podman-e2e-554133839/subtest-3789943928/p/root --runroot /tmp/podman-e2e-554133839/subtest-3789943928/p/runroot --runtime crun --conmon /usr/bin/conmon --network-config-dir /etc/containers/networks --network-backend netavark --cgroup-manager systemd --tmpdir /tmp/podman-e2e-554133839/subtest-3789943928/p --events-backend file --storage-driver overlay quadlet rm -af
quadlet-remove-all-test-1766421735.container
quadlet-remove-all-test-1766421735.network
quadlet-remove-all-test-1766421735.volume
Running: /home/kavish/podman/bin/podman --storage-opt overlay.imagestore=/tmp/podman-e2e-554133839/imagecachedir --root /tmp/podman-e2e-554133839/subtest-3789943928/p/root --runroot /tmp/podman-e2e-554133839/subtest-3789943928/p/runroot --runtime crun --conmon /usr/bin/conmon --network-config-dir /etc/containers/networks --network-backend netavark --cgroup-manager systemd --tmpdir /tmp/podman-e2e-554133839/subtest-3789943928/p --events-backend file --storage-driver overlay quadlet list --format json
[]
Running: /home/kavish/podman/bin/podman --storage-opt overlay.imagestore=/tmp/podman-e2e-554133839/imagecachedir --root /tmp/podman-e2e-554133839/subtest-3789943928/p/root --runroot /tmp/podman-e2e-554133839/subtest-3789943928/p/runroot --runtime crun --conmon /usr/bin/conmon --network-config-dir /etc/containers/networks --network-backend netavark --cgroup-manager systemd --tmpdir /tmp/podman-e2e-554133839/subtest-3789943928/p --events-backend file --storage-driver overlay stop --all -t 0
Running: /home/kavish/podman/bin/podman --storage-opt overlay.imagestore=/tmp/podman-e2e-554133839/imagecachedir --root /tmp/podman-e2e-554133839/subtest-3789943928/p/root --runroot /tmp/podman-e2e-554133839/subtest-3789943928/p/runroot --runtime crun --conmon /usr/bin/conmon --network-config-dir /etc/containers/networks --network-backend netavark --cgroup-manager systemd --tmpdir /tmp/podman-e2e-554133839/subtest-3789943928/p --events-backend file --storage-driver overlay pod rm -fa -t 0
Running: /home/kavish/podman/bin/podman --storage-opt overlay.imagestore=/tmp/podman-e2e-554133839/imagecachedir --root /tmp/podman-e2e-554133839/subtest-3789943928/p/root --runroot /tmp/podman-e2e-554133839/subtest-3789943928/p/runroot --runtime crun --conmon /usr/bin/conmon --network-config-dir /etc/containers/networks --network-backend netavark --cgroup-manager systemd --tmpdir /tmp/podman-e2e-554133839/subtest-3789943928/p --events-backend file --storage-driver overlay rm -fa -t 0
• [0.578 seconds]
------------------------------
SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS
------------------------------
[SynchronizedAfterSuite]
/home/kavish/podman/test/e2e/common_test.go:235
integration timing results
quadlet system generator Running quadlet force remove all Should remove all quadlets at once 0.523858
[SynchronizedAfterSuite] PASSED [0.177 seconds]
------------------------------
Ran 1 of 2443 Specs in 4.624 seconds
SUCCESS! -- 1 Passed | 0 Failed | 0 Pending | 2442 Skipped
PASS
Ginkgo ran 1 suite in 8.290264111s
Test Suite PassedI also verified this against the latest main branch, and it passed there as well. Even with sudo ginkgo run -v --focus-file=quadlet_test.go test/e2e/, it’s still passing:
OUTPUT REDACTED
quadlet system generator Running success quadlet test case logopt.container 0.013379
quadlet system generator Running success quadlet test case label.container 0.013625
quadlet system generator Running success quadlet test case exec.container 0.013705
quadlet system generator Running success quadlet test case pull.container 0.013814
quadlet system generator Running success quadlet test case readonly-notmpfs.container 0.014216
quadlet system generator Running success quadlet test case capabilities.container 0.014951
quadlet system generator Running quadlet force remove all Should remove all quadlets at once 0.503787
[SynchronizedAfterSuite] PASSED [0.175 seconds]
------------------------------
Ran 301 of 2443 Specs in 26.713 seconds
SUCCESS! -- 301 Passed | 0 Failed | 0 Pending | 2142 Skipped
PASS
Ginkgo ran 1 suite in 31.515989818s
Test Suite PassedI'm not sure why it's failing.
There was a problem hiding this comment.
I noticed the test was using Exit(0) in several places. I've updated it to use ExitCleanly() instead, which is the recommended Ginkgo matcher. This might resolve the F43 failure. I will push soon and see what's up.
Update: Done.
06ccfe0 to
cf9f56d
Compare
cf9f56d to
bd3d648
Compare
|
Ping. Is there anything else you need from my side to move this forward ? |
|
Code LGTM. The CI failure appears legitimate, but I'm not sure how to resolve it. @containers/podman-maintainers @lsm5, could you take a look? Any ideas? |
|
PTAL @containers/podman-maintainers |
|
I think maybe the error is because the overlay mount wasn't fully torn down before unlinkat /tmp/CI_**/podman-e2e-.../subtest-**/p/root/overlay/**: directory not empty
< Exit [SynchronizedAfterSuite] TOP-LEVEL - /var/tmp/go/src/github.com/containers/podman/test/e2e/common_test.go:237Looks like a DeferCleanup(func() {
podmanTest.PodmanExitCleanly("stop", "-a", "-t", "0")
podmanTest.PodmanExitCleanly("quadlet", "rm", "-af")
}) |
|
That could be it. But anyway, please rebase on main; we changed import paths. |
a13ad64 to
3248d1e
Compare
|
The |
3248d1e to
ad27bb4
Compare
ad27bb4 to
24afe40
Compare
24afe40 to
4f4c8b6
Compare
|
[NON-BLOCKING] Packit jobs failed. @containers/packit-build please check. Everyone else, feel free to ignore. |
Honny1
left a comment
There was a problem hiding this comment.
Thanks, LGTM
PTAL @containers/podman-maintainers
…ntainer-tools#27653) Refactor removelist into sets Add quadlet rm --all test with safename add an integration test for quadlet rm --all(skip for remote clients) Signed-off-by: Kavish Gour <kavishgr@protonmail.com>
Ensure that the --all (-a) flag cannot be used simultaneously with specific quadlet arguments on the CLI. This prevents logical conflicts when a user provides both the --all flag and specific quadlets. - Add validation check in cmd/podman/quadlet/remove.go - Update the docs to document this behaviour with an example - Improve user feedback by explicitly stating why the command failed Signed-off-by: Kavish Gour <kavishgr@protonmail.com>
4f4c8b6 to
1ab78c4
Compare
|
@psss Done. Rebased on latest main. |
|
[NON-BLOCKING] Packit jobs failed. @containers/packit-build please check. Everyone else, feel free to ignore. |
|
|
||
| // Remove .app and .asset files after the main quadlet removal loop | ||
| // This ensures they are cleaned up properly since they are not included in allQuadletPaths | ||
| for entry := range removeSet { |
There was a problem hiding this comment.
Not blocking: metadata files in removeSet are cleaned up regardless of whether the associated quadlet removals succeeded. If all quadlets in an app fail to remove (e.g., running without --force), the .app file is still deleted, orphaning them. This was the same behavior before this PR, just noting it as something to potentially address in a follow-up.
|
PTAL @containers/podman-maintainers @containers/podman-reviewers |
|
We want to remove support for I am afraid that we should close this one. |
|
Cool. Thanks for the update and thanks for the guidance throughout this PR. Closing this now. |
commits. (
git commit -s). (If needed, usegit commit -s --amend). The author email must matchthe sign-off email address. See CONTRIBUTING.md
for more information.
Fixes: #00000in commit message (if applicable)make validatepr(format/lint checks)Noneif no user-facing changes)Does this PR introduce a user-facing change?
Fixes: #27647
Note on Dependencies:
This PR is dependent on the changes from issue #27653, as outlined in PR #27693. Once #27693 merges, I will rebase and push the changes here.
What I did (
quadlet.gofile):Fixed
reverseMaplookup by using the base filename instead of the full path, since reverseMapkeys are filenames onlyAdded conditional path handling when expanding quadlets from .app files - use full paths when --all flag is set (since
getAllQuadletPathsreturns full paths), but use just filenames otherwise (sincegetQuadletPathByNameexpects filenames)Moved the cleanup of .app and .asset metadata files outside the main quadlet removal loop. Previously these files were being left behind because they aren't included in
allQuadletPaths. Now they're properly removed after all quadlets have been processedAdded logging for the files being removed
These changes fix the issue where .
appfiles were not being deleted during removal(podman quadlet --all --force), and also resolve path resolution errors when removing individual apps (e.g., podman quadlet rm .nginx-test.app).Test:
podman quadlet rm -afcommand correctly removes all quadlet files.